/**
 * 
 */
package com.java.test.user.dto;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.java.test.util.DateUtil;

/**
 * @author 一号日志消息
 *
 */
public class Message_1 implements RowMapper<Message_1> {

	// 主键id
	private int id;

	// 用户id
	private String userid;

	// 上线时间
	private String onlineTime;

	// 下线时间
	private String offlineTime;

	private String ip;

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getOnlineTime() {
		return onlineTime;
	}

	public void setOnlineTime(String onlineTime) {
		this.onlineTime = onlineTime;
	}

	public String getOfflineTime() {
		return offlineTime;
	}

	public void setOfflineTime(String offlineTime) {
		this.offlineTime = offlineTime;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Message_1 mapRow(ResultSet rs, int rowNum) throws SQLException {
		Message_1 info = new Message_1();
		info.setId(rs.getInt("id"));
		info.setUserid(rs.getString("userid"));
		info.setOnlineTime(DateUtil.convertTimeToString(rs.getLong("onlineTime")));
		info.setOfflineTime(DateUtil.convertTimeToString(rs.getLong("offlineTime")));
		info.setIp(ip);
		rs.getString("ip");
		return info;
	}

}
